Skip to content

Instantly share code, notes, and snippets.

@ih2502mk
ih2502mk / list.md
Last active May 20, 2024 05:06
Quantopian Lectures Saved
@jangroth
jangroth / dendron-to-obsidian.py
Created March 25, 2023 04:53
Converts dendron note structure to obsidian note structure
# converts dendron note structure to obsidian note structure
# - removes frontmatter
# - adds tags
# - converts internal links
# - ignores empty (frontmatter-only) notes
#
# use at your own risk
import glob
import re
@loilo
loilo / pass-slots.md
Last active May 20, 2024 05:03
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

@squarou
squarou / departments_regions_france_2016.csv
Last active May 20, 2024 05:01
Liste des départements français et leurs régions au 1er Janvier 2016 (CSV)
departmentCode departmentName regionCode regionName
01 Ain 84 Auvergne-Rhône-Alpes
02 Aisne 32 Hauts-de-France
03 Allier 84 Auvergne-Rhône-Alpes
04 Alpes-de-Haute-Provence 93 Provence-Alpes-Côte d'Azur
05 Hautes-Alpes 93 Provence-Alpes-Côte d'Azur
06 Alpes-Maritimes 93 Provence-Alpes-Côte d'Azur
07 Ardèche 84 Auvergne-Rhône-Alpes
08 Ardennes 44 Grand-Est
09 Ariège 76 Occitanie
@jen6
jen6 / skadnetwork_postback_signature_verify_example.py
Created January 4, 2021 16:11
skadnetwork postback signature verify example
# https://github.com/pyca/cryptography
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import ec
from base64 import b64decode
apple_pbkey = b64decode(
"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWdp8GPcGqmhgzEFj9Z2nSpQVddayaPe4FMzqM9wib1+aHaaIzoHoLN9zW4K8y4SPykE3YVK3sVqW6Af0lfx3gg=="
)
data = {
@davecoutts
davecoutts / unifi_ubuntu_2004.sh
Last active May 20, 2024 04:59
Install Ubiquiti Unifi Controller on Ubuntu 20.04
# Install Ubiquiti Unifi Controller on Ubuntu 20.04.
# As tested on a fresh install of ubuntu-20.04.1-live-server, August 22nd 2020.
# Thanks to https://gist.github.com/tmuncks for posting the updated install steps.
sudo apt update
sudo apt install --yes apt-transport-https
echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
@arturo182
arturo182 / bom2grouped_csv_jlcpcb.xsl
Last active May 20, 2024 04:57
A KiCad BOM script for generating JLCPCB PCBA-compatible files!
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
Copyright (C) 2018, Kicad developers.
Copyright (C) 2019, arturo182.
GPL v2.
Functionality:
Generation of JLCPCB PCBA compatible BOM
@mowings
mowings / kubeadm.md
Last active May 20, 2024 04:56
Example kubeadm config file

Since there's no (or not many) real examples of valid kubeadm config files out there (for use with kubeadm --config <file>), here is an example. This version declares a control plane endpoint, the proxy for an HA setup, and also includes a KubeProxyConfiguation to tell kube-proxy to use ipvs.

You can leave off the controlPlaneEndpoint (which points to the HA proxy ip:port) if you are not running in HA mode, and you can omit the KubeProxyConfiguration if you are satisfied with using the default of iptables for the proxy mode.

To initalize an HA setup using this file with kubeadm, you can execute:

<!DOCTYPE html>
<html>
<title>Popup Box</title>
<style>
*{margin:0px; padding:0px; font-family:Helvetica, Arial, sans-serif;}
/* Full-width input fields */
input[type=text], input[type=password] {
width: 90%;
padding: 12px 20px;
margin: 8px 26px;
@Artefact2
Artefact2 / README.md
Last active May 20, 2024 04:53
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggerganov/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix